//package com.zzh.partnersys.im.rocketmq.consumer;
//
//import com.zzh.partnersys.chat.message.request.InviteAddTeamRequestMessage;
//import com.zzh.partnersys.entity.FriendMessageDO;
//import com.zzh.partnersys.rocketmq.contant.MQConstant;
//import com.zzh.partnersys.service.FriendMessageService;
//import com.zzh.partnersys.utils.FriendKeyUtils;
//import org.apache.rocketmq.spring.annotation.MessageModel;
//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
//import org.apache.rocketmq.spring.core.RocketMQListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
///**
// * @author ??????
// * @version 1.0
// * ����������Ѽ����������������??
// */
//@RocketMQMessageListener(
//        topic = MQConstant.INVITE_ADD_TEAM_TOPIC,
//        consumerGroup = MQConstant.CONSUMER_GROUP_INVITE_ADD_TEAM,
//        messageModel = MessageModel.BROADCASTING)
//@Component
//public class InviteAddTeamMQConsumer implements RocketMQListener<InviteAddTeamRequestMessage> {
//
//    @Autowired
//    private FriendMessageService friendMessageService;
//
//    @Override
//    public void onMessage(InviteAddTeamRequestMessage inviteAddTeamRequestMessage) {
//        //��ȡ�������Ϣ���뵽���ݿ�??
//        FriendMessageDO friendMessage = new FriendMessageDO();
//        friendMessage.setType(4);
//        Long fromUid = inviteAddTeamRequestMessage.getFromUid();
//        Long toUid = inviteAddTeamRequestMessage.getToUid();
//        friendMessage.setFromUid(fromUid);
//        friendMessage.setFriendKey(FriendKeyUtils.getFriendKeyUID(fromUid,toUid));
//        friendMessage.setContent(inviteAddTeamRequestMessage.getContent());
//        //��������
//        friendMessageService.insertData(friendMessage);
//    }
//
//
//}
